home *** CD-ROM | disk | FTP | other *** search
- /*
- ** $RCSfile: errorlog.h,v $
- ** $Filename: ErrorLog.h $
- ** $Revision: 1.2 $
- ** $Date: 2002/01/05 18:14:29 $
- **
- ** ErrorLog C header file (version 1.2 beta)
- **
- ** (C) Copyright 1993-2001 by Etienne Vogt
- */
-
- #ifndef EXEC_PORTS_H
- #include <exec/ports.h>
- #endif
- #ifndef EXEC_SEMAPHORES_H
- #include <exec/semaphores.h>
- #endif
- #ifndef SANA2_SANA2DEVICE_H
- #include <devices/sana2.h>
- #endif
-
- struct HellGate
- { struct SignalSemaphore hg_SigSem; /* Semaphore for arbitration */
- UWORD hg_LogCount; /* Number of logged devices */
- struct MsgPort hg_MsgPort; /* Message Port for IORequests */
- UWORD hg_AbortCount; /* Number of abort Requests */
- struct List hg_DoomList; /* List of logged devices */
- UWORD hg_ErrorCount; /* Total number of errors */
- ULONG hg_OpCount; /* Total number of IOs */
- void (*hg_PatchBeginIO)(); /* Pointer to patched BeginIO code */
- void (*hg_PatchAbortIO)(); /* Pointer to patched AbortIO code */
- void (*hg_DummyCopyBuff)(); /* Pointer to dummy CopyBuff routine */
- APTR hg_Pool; /* Memory pool for dynamic structures */
- };
-
- struct EvilNode
- { struct MinNode en_Node; /* Link into list */
- struct IORequest *en_OrigIOReq; /* Pointer to Original IORequest */
- struct DoomNode *en_DoomNode; /* Pointer to Device DoomNode */
- UBYTE en_EffectIOReq[0]; /* Effective IORequest goes here */
- };
-
- #define DNAME_SIZE 8 /* Size of DoomNode name */
- #define DVNAME_SIZE 24 /* Size of exec device name */
- #define TNAME_SIZE 32 /* Size of calling task name */
-
- struct DoomNode
- { struct Node dn_Link; /* Standard Node */
- UWORD dn_Flags; /* DoomNode Flags */
- ULONG dn_UnitNum; /* Unit number */
- UBYTE dn_DoomName[DNAME_SIZE]; /* Log Name for device/unit */
- UBYTE dn_DeviceName[DVNAME_SIZE]; /* Exec device name (not pointer !) */
- UBYTE dn_DevSubType; /* Device subtype (mainly for SCSI devices) */
- UBYTE dn_DevType; /* Type of device logged (NSD ID) */
- UWORD dn_IOSize; /* Size of device's IORequests */
- APTR dn_OrigBeginIO; /* Pointer to original BeginIO code */
- APTR dn_OrigAbortIO; /* Pointer to original AbortIO code */
- ULONG dn_OpCount; /* Device Operation count so far */
- UWORD dn_ErrorCount; /* Device Error count so far */
- UWORD dn_ActiveCount; /* Number of active Requests */
- struct MinList dn_Evils; /* Linked List of active Requests */
- struct IOSana2Req dn_IOReq; /* Largest known IORequest yet */
- struct MsgPort dn_IOPort; /* IORequest reply port */
- };
-
- #define NT_DOOMNODE (NT_USER)
-
- /* DoomNode Flags */
-
- #define DNB_ENABLED 0 /* Enable iorequests catching */
- #define DNB_LOGERRORS 1 /* Log errors */
-
- #define DNF_ENABLED (1L << 0)
- #define DNF_LOGERRORS (1L << 1)
-
- /* Alert defines */
-
- #define AN_ErrorLog 0x70000000
- #define AN_elBadMessage 0x70000001 /* Unexpected message at HellGate */
- #define AN_elLoggerFail 0x700B0002 /* Couldn't start logger process */
- #define AN_elNoHellGate 0x70000003 /* Couldn't find HellGate semaphore */
- #define AN_elBadEvilLst 0x70000004 /* Evil List is corrupt */
- #define AN_elNoDoomNode 0x70000005 /* Couldn't find DoomNode */
- #define AO_ErrorLog 0x00008070
-